/*
 * <p>Copyright® 2009-2022 东软 IT 实训中心版权所有。</p>
 */

package com.max.back.doctor.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.max.back.entity.Prescription;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.Map;

/**
* @description 
* 
* <p>
* <code>PrescriptionDao</code>
*
* </p>
* 
* @see 
* @author 辛凤文 forward.seen@foxmail.com
* @version 1.0 
* @time 2022/7/27 21:22 
*/
@Repository("/doctorPrescriptionDao")
public interface PrescriptionDao extends BaseMapper<Prescription> {

    /**
     * 根据病历id查找Prescription中的id主键
     * @param patientHistoryId
     * @return
     */
    @Select({
            "select id from Prescription where patient_History_Id = #{patientHistoryId}"
    })
    String queryPrescriptionIdByPatientHistory(
            @Param("patientHistoryId") String patientHistoryId);

}